import request from '@/utils/request'

/**
 * 修改密码
 */

export function changePwd(params) {
  return request({
    url: '/users/sysUser/password/update',
    method: 'post',
    params
  })
}

/**
 * 获取短信模板
 */

export function fetchGetSMSTemplate(params) {
  return request({
    url: '/templateManager/findAllMessageTemplate',
    method: 'get',
    params
  })
}

/**
 * 发送短信的详情
 */

export function fetchSendMessageView(params) {
  return request({
    url: '/informationPush/alidayuMessage/findDetail',
    method: 'get',
    params
  })
}

/**
 * 发送短信
 */

export function fetchSendSMS(params) {
  return request({
    url: '/informationPush/sendMessage',
    method: 'post',
    params
  })
}

/**
 * 新建短信模板
 */

export function fetchNewSMSTemplate(params) {
  return request({
    url: '/templateManager/saveMessageTemplate',
    method: 'post',
    params
  })
}

/**
 * 搜索短信模板
 */

export function fetchSearchSMSTemplate(params) {
  return request({
    url: '/templateManager/searchMessageTemplates',
    method: 'get',
    params
  })
}

/**
 * 删除短信模板
 */

export function fetchDeleteSMSTemplate(params) {
  return request({
    url: '/templateManager/deleteMessageTemplates',
    method: 'post',
    params
  })
}

/**
 * 短信发送记录
 */

export function fetchAlidayuMessageSendData(params) {
  return request({
    url: '/informationPush/alidayuMessageSend/findAll',
    method: 'get',
    params
  })
}

/**
 * 友盟消息模板
 */

export function fetchYouMengTemplateData(params) {
  return request({
    url: '/templateManager/findAllPushTemplate',
    method: 'get',
    params
  })
}

/**
 * 友盟新建消息模板
 */

export function fetchNewYouMengTemplateData(params) {
  return request({
    url: '/templateManager/savePushTemplate',
    method: 'post',
    params
  })
}

/**
 * 友盟删除消息模板
 */

export function fetchDeleteYouMengTemplateData(params) {
  return request({
    url: '/templateManager/deletePushTemplate',
    method: 'post',
    params
  })
}

/**
 * 友盟搜索消息模板
 */

export function fetchSearchYouMengTemplateData(params) {
  return request({
    url: '/templateManager/searchPushTemplate',
    method: 'get',
    params
  })
}

/**
 * 友盟推送记录详情
 */

export function fetchYouMengViewData(params) {
  return request({
    url: '/informationPush/youmengPush/findDetail',
    method: 'get',
    params
  })
}

/**
 * 友盟推送记录
 */

export function fetchYouMengPushHistoryData(params) {
  return request({
    url: '/informationPush/youMengPush/findAll',
    method: 'get',
    params
  })
}

/**
 * 发送友盟推送
 */

export function fetchYouMengPushData(params) {
  return request({
    url: '/informationPush/youmengPush',
    method: 'post',
    params
  })
}

/**
 * 推送类型
 */

export function fetchMessageTypeData(params) {
  return request({
    url: '/templateManager/findAllMessageType',
    method: 'get',
    params
  })
}

/**
 * 站内APP推送记录
 */

export function fetchAppMessagePushHistoryData(params) {
  return request({
    url: '/informationPush/AppMessagePush/findAll',
    method: 'get',
    params
  })
}

/**
 * 发送站内APP推送
 */

export function fetchAppMessagePushData(params) {
  return request({
    url: '/informationPush/AppMessagePush',
    method: 'post',
    params
  })
}

/**
 * 站内APP发送推送详情
 */

export function fetchAppMessageViewData(params) {
  return request({
    url: '/informationPush/AppMessagePush/findDetail',
    method: 'get',
    params
  })
}



/**
 * 上传阴超图片
 */

export function fetchUploadImg(data) {
  return request({
    url: '/users/ultrasound/upload',
    method: 'post',
    data
  })
}

/**
 * 获取阴超图片
 */

export function fetchDownloadImg(params) {
  return request({
    url: '/users/record/ultrasound',
    method: 'get',
    params
  })
}
